package com.ruoyi.assets.service.impl;

import java.util.List;

import com.ruoyi.assets.domain.AssetCategories;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.assets.mapper.AssetMethodsMapper;
import com.ruoyi.assets.domain.AssetMethods;
import com.ruoyi.assets.service.IAssetMethodsService;

/**
 * 资产信息Service业务层处理
 * 
 * @author 孙帆科
 * @date 2025-03-04
 */
@Service
public class AssetMethodsServiceImpl implements IAssetMethodsService 
{
    @Autowired
    private AssetMethodsMapper assetMethodsMapper;

    /**
     * 查询资产信息
     * 
     * @param methodsId 资产信息主键
     * @return 资产信息
     */
    @Override
    public AssetMethods selectAssetMethodsByMethodsId(Long methodsId)
    {
        return assetMethodsMapper.selectAssetMethodsByMethodsId(methodsId);
    }

    /**
     * 查询资产信息列表
     * 
     * @param assetMethods 资产信息
     * @return 资产信息
     */
    @Override
    public List<AssetMethods> selectAssetMethodsList(AssetMethods assetMethods)
    {
        return assetMethodsMapper.selectAssetMethodsList(assetMethods);
    }

    /**
     * 新增资产信息
     * 
     * @param assetMethods 资产信息
     * @return 结果
     */
    @Override
    public int insertAssetMethods(AssetMethods assetMethods)
    {
        return assetMethodsMapper.insertAssetMethods(assetMethods);
    }

    /**
     * 修改资产信息
     * 
     * @param assetMethods 资产信息
     * @return 结果
     */
    @Override
    public int updateAssetMethods(AssetMethods assetMethods)
    {
        return assetMethodsMapper.updateAssetMethods(assetMethods);
    }

    /**
     * 批量删除资产信息
     * 
     * @param methodsIds 需要删除的资产信息主键
     * @return 结果
     */
    @Override
    public int deleteAssetMethodsByMethodsIds(Long[] methodsIds)
    {
        return assetMethodsMapper.deleteAssetMethodsByMethodsIds(methodsIds);
    }

    /**
     * 删除资产信息信息
     * 
     * @param methodsId 资产信息主键
     * @return 结果
     */
    @Override
    public int deleteAssetMethodsByMethodsId(Long methodsId)
    {
        return assetMethodsMapper.deleteAssetMethodsByMethodsId(methodsId);
    }

    @Override
    public AssetMethods selectMethodsCategoriesByMethodsId(Long cateoriesId) {
        return assetMethodsMapper.MethodsCategoriesByMethodsId(cateoriesId);
    }
}
